package edu.uj.util;

/**
 * Object that notifies its observers of certain events. Observers can
 * subscribe and unsubscribe from being notified. See also Observer design
 * pattern from GOF book.
 * @author Piotrek
 */
public interface Observed {
    
    /**
     * given observer will be always notified by this Observed of certain
     * events.
     */
    public void subscribe(Observer o);

    /**
     * stops notifying given observer of events from the observed. Has no effect
     * when observer has not been subscribed before.
     */
    public void unsubscribe(Observer o);
}
